package collection.stream;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        List<Integer>scores=new ArrayList<>();
        for(int i=0;i<5;i++){
            scores.add((int)(Math.random()*100));
        }
        System.out.println("成绩列表："+scores);
        System.out.println("成绩是否全部及格："+scores.stream().allMatch(x->x>=60));
        int sum=scores.stream().reduce((x,y)->x+y).get();
        System.out.println("成绩总和："+sum);
    }
}
